<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
       <!-- 需求： 点击按钮，让 h3 显示， 再点击 让 h3 隐藏 -->
       <input type="button" value="切换" @click='flag=!flag'>
       <h3 v-if='flag'>这是一个h3</h3>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
    var vm= new Vue({
        el:'#app',
        data:{
            flag:true
        },
        methods:{
            
        }

    })
    </script>
</body>
</html>

